﻿// Decompiled with JetBrains decompiler
// Type: Netick.Rpc
// Assembly: Netick, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
// MVID: 6726ECA1-C773-4CF7-8952-E81B30D93B52
// Assembly location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.dll
// XML documentation location: D:\WorkSpaceDemo\UPM\NetickForUnity\Netick\Runtime\Netick.xml

using System;

#nullable disable
namespace Netick;

/// <summary>
///  Use this attribute on any method you want to make an RPC. Must have the return type of void.
/// <para> * Use the parameter "source" to specify who is allowed to send this RPC.</para>
/// <para> * Use the parameter "target" to specify who is allowed to receive and execute this RPC.</para>
/// <para> * Use the parameter "isReliable" to specify if this Rpc should be reliable or not, meaning it won't be lost (due to packet loss).</para>
/// <para> * Use the parameter "localInvoke" to specify if this Rpc should be executed on the machine it was called from.</para>
///  </summary>
[AttributeUsage(AttributeTargets.Method, Inherited = true, AllowMultiple = false)]
public class Rpc : Attribute
{
  public RpcPeers Source;
  public RpcPeers Target;
  public bool IsReliable;

  public Rpc(RpcPeers source = RpcPeers.Everyone, RpcPeers target = RpcPeers.Everyone, bool isReliable = false, bool localInvoke = false)
  {
    this.Source = source;
    this.Target = target;
    this.IsReliable = isReliable;
  }
}
